{% load staticfiles %}
{% load appMonitor_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>应用监控管理系统</title>
    <script src="/static/jquery-1.12.4.js"></script>
    <link href="/static/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="/static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>

    <!--my self add-->
    <style type="text/css">
        body {
            margin: 0 auto;
            background-color: #F1F1F1;
        }

        /*顶部导航栏*/
        .nav{
            width: 100%;
            height:48px;
            background-color: #5bc0de;
        }

        /*左侧菜单栏*/
        .side-menu{
            position: absolute;
            top:48px;
            left:0px;
            bottom: 0px;
            width: 200px;
            /*background-color: #515151;*/
            color: #adb3b8;
            border: 1px solid #ddd;
            border-radius: 2px;
            box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
        }
        .div1{text-align:center;width:100%;padding-top:10px;}
        .div2{height:40px;line-height:40px;cursor:pointer;font-size:13px;position:relative;border-bottom:#000 3px double;}
{#        .jbsz {position:absolute;height:20px;width:20px;left:40px;top:10px;background:url(images/1.png);}#}
{#        .xwzx {position:absolute;height:20px;width:20px;left:40px;top:10px;background:url(images/2.png);}#}
{#        .zxcp {position:absolute;height:20px;width:20px;left:40px;top:10px;background:url(images/4.png);}#}
{#        .lmtj {position:absolute;height:20px;width:20px;left:40px;top:10px;background:url(images/8.png);}#}
{#        .div3{display:none;font-size:13px;}#}
        .div3{font-size:13px;}
        .div3 ul{margin:0;padding:0;}
        .div3 li{height:30px;line-height:30px;list-style:none;border-bottom:#ccc 1px dotted;text-align:left;padding-left: 25px;}



        /*右侧内容区*/
        .side-content{
            position: absolute;
            top:48px;
            right:0px;
            bottom: 0px;
            left:200px;
            min-width: 800px;
            overflow: auto;
        }

        .content-hostInfo{
            margin: 10px 10px;
            background-color: #ffffff;
            padding: 10px 10px;
            border: 1px solid #ddd;
            border-radius: 2px;
            box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);

        }
        .content-applicationInfo{
            margin: 10px 10px;
            background-color: #ffffff;
            padding: 5px 10px;
            border: 1px solid #ddd;
            border-radius: 2px;
            box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
            min-height: 500px;
        }
        .appHostList{
            padding: 5px 0px;
        }
        .appDetailInfo table {
            align-content: center;
        }
    </style>

</head>
<body>
    <!-- 导航栏 -->
    {% include "./appMonitor/include/nav.html" %}

    <!--左侧菜单-->
    <div class="side-menu">
        <div class="div1">
            <div class="div2"><div class="jbsz"></div>应用管理系统</div>
            <div class="div3">
                <ul>
                    {% get_environments as environment_list %}
                    {% for env in environment_list %}
                        <li>
                            <a href="{% url 'appMonitor:host' env.pk %}">{{ env }}</a>
                        </li>
                    {% endfor %}
                    <li><a href="{% url 'appMonitor:allEnvAppDiff' %}">各环镜应用启动情况</a></li>
                </ul>
            </div>
            <div class="div2"><div class="xwzx"></div>新闻中心</div>
            <div class="div3">
                <ul>
                    <li><a href="#">管理文章</a></li>
                    <li><a href="#">文章分类</a></li>
                    <li><a href="#">添加文章</a></li>
                </ul>
            </div>
        </div>

    </div>




    <!--右侧内容-->
    <div class="side-content">
    <!--此环镜IT基础设施(如主机、数据库)信息：-->
        {#        {% include "./appMonitor/include/envHostInfo.html" %}#}
        {% block envhostinfo %}
        {% endblock %}

    <!--此环镜每台主机上运行的应用信息-->
        {% block envhostappinfo %}
        {% endblock %}
    </div>

    <script type="text/javascript">
        $(document).ready(function(){
            $(".div2").click(function(){
                $(this).next("div").slideToggle("slow").siblings(".div3:visible").slideUp("slow");
            });
        });
    </script>


</body>
</html>